import request from '@/utils/request'

// 查询采购项目列表
export function listOutsourcingProject(data) {
  return request({
    url: `/system/outsourcingProject/selectProjectList`,
    method: 'post',
    data: data
  })
}

// 查询采购项目详细
export function getOutsourcingProject(id) {
  return request({
    url: '/system/outsourcingProject/' + id,
    method: 'get'
  })
}

// 新增采购项目
export function addOutsourcingProject(data) {
  return request({
    url: '/system/outsourcingProject',
    method: 'post',
    data: data
  })
}

// 修改采购项目
export function editOutsourcingProject(data) {
  return request({
    url: '/system/outsourcingProject',
    method: 'put',
    data: data
  })
}

// 删除采购项目
export function delOutsourcingProject(id) {
  return request({
    url: '/system/outsourcingProject/' + id,
    method: 'delete'
  })
}

//获取采购项目信息
export function getPurchasingInfo(query) {
  return request({
    url: '/web/purchasingProject/getPurchasingInfo',
    method: 'get',
    params: query
  })
}

//查看大类列表
export function getLargeCategoryList(query) {
  return request({
    url: '/system/outsourcingProject/getLargeCategoryList',
    method: 'get',
    params: query
  })
}
//查看中类列表
export function getMediumCategoryList(query) {
  return request({
    url: '/system/outsourcingProject/getMediumCategoryList',
    method: 'get',
    params: query
  })
}
